<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>

</head>
<!--
实现输入之后点F2会弹框
bug1:按F2键是设置音量没有效果，解决办法：同时按住Fn才有用
-->

<body>
    <div id="a">
        <div>
            id:<input type="text" v-model='id' @keyup.f2='tijiao'>
        </div>

    </div>
    <script>
        Vue.config.keyCodes.f2 = 113;
        new Vue({
            el: '#a ',
            data: {
                id: '',


            },
            methods: {
                tijiao: function() {
                    alert(this.id);
                },


            }
        })
    </script>
</body>

</html>